﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VerifyInput.aspx.cs" Inherits="StockTake_VerifyInput" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>输入盘点结果</title>
        <link href="../css/base.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../JavaScript/jq.js"></script>
        <script type="text/javascript" src="../JavaScript/ymPrompt.js"></script>  
        <script type="text/javascript" src="../JavaScript/AjaxJS.js"></script>
        <script>
        function verify()
        {
                var temp=document.getElementById("PacketQty");
                 if(!/^\d+(\.\d+)?$/.test(temp.value))
                {
                    alert("所有字段必填,且为数值");               
                 
		           return false;
                }
                temp=document.getElementById("PacketQty2");
                 if(!/^\d+(\.\d+)?$/.test(temp.value))
                {
                    alert("所有字段必填,且为数值");               
                 
		           return false;
                }        
                temp=document.getElementById("NetWeight");
                 if(!/^\d+(\.\d+)?$/.test(temp.value))
                {
                    alert("所有字段必填,且为数值");               
                 
		           return false;
                }    
                temp=document.getElementById("GrossWeight");
                 if(!/^\d+(\.\d+)?$/.test(temp.value))
                {
                    alert("所有字段必填,且为数值");               
                 
		           return false;
                }                                            
                return true;
        }
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td height="24"  align="right">大件数：</td>
                <td style="width: 150px">
                    <input id="PacketQty"  style="width: 80px" type="text" class="txt_left"  runat="server" />
                    <asp:Label ID="PacketQtyUnit" runat="server" Text="件"></asp:Label>
                </td>
            </tr>
            <tr>
                <td  align="right">小件数：</td>
                <td style="width:120px">
                     <input id="PacketQty2" style="width: 80px" type="text" class="txt_left" runat="server"/>
                     <asp:Label ID="PacketQty2Unit" runat="server" Text="件"></asp:Label>

                </td>
            </tr>
            <tr>
                <td  align="right"><p >净重：</p></td>
                <td style="width: 120px">
                    <input id="NetWeight"  style="width: 80px" type="text" class="txt_left"  runat="server" />
                    <asp:Label ID="NewWeightUnit" runat="server" Text="kg"></asp:Label>
               </td>
            </tr>
            <tr>
                <td align="right"><p >毛重：</p></td>
                <td >
                    <input id="GrossWeight"  style="width: 80px" type="text" class="txt_left"  runat="server" />
                    <asp:Label ID="GrossWeightUnit" runat="server" Text="kg"></asp:Label>        
                </td>        
            </tr> 
            <tr>
                <td colspan="2" align="center">
                    <asp:Button ID="btnVerify" runat="server" Text="核对" onclick="btnVerify_Click"  OnClientClick="return verify();" />
                    <asp:Button ID="btnCancel" runat="server" Text="取消" onclick="btnCancel_Click" />
                </td>       
            </tr> 
        </table>
    </div>
    </form>
</body>
</html>
